package org.gr.ias.common.entity;

import java.io.Serializable;

public class CapitalInvestmentExtDebt implements Serializable {
    /** 主键*/
    private String id;

    /** 对应投资信息ID*/
    private String capitalInvestmentId;

    /** 投资期限(开始)*/
    private Integer investmentPeriodStart;

    /** 投资期限(结束)*/
    private Integer investmentPeriodEnd;

    /** 投资期限单位*/
    private String investmentPeriodUnit;

    /** 最低回报要求(%/年)*/
    private Integer lowestProfit;

    /** 风控要求：
            01-抵押
            02-担保
            03-信用
            04-其他*/
    private String riskControlRequirement;

    /** 抵押物类型*/
    private String collateralType;

    /** 抵押物折扣率(开始)*/
    private Integer collateralDiscountStart;

    /** 抵押物折扣率(结束)*/
    private Integer collateralDiscountEnd;

    private static final long serialVersionUID = 1L;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getCapitalInvestmentId() {
        return capitalInvestmentId;
    }

    public void setCapitalInvestmentId(String capitalInvestmentId) {
        this.capitalInvestmentId = capitalInvestmentId == null ? null : capitalInvestmentId.trim();
    }

    public Integer getInvestmentPeriodStart() {
        return investmentPeriodStart;
    }

    public void setInvestmentPeriodStart(Integer investmentPeriodStart) {
        this.investmentPeriodStart = investmentPeriodStart;
    }

    public Integer getInvestmentPeriodEnd() {
        return investmentPeriodEnd;
    }

    public void setInvestmentPeriodEnd(Integer investmentPeriodEnd) {
        this.investmentPeriodEnd = investmentPeriodEnd;
    }

    public String getInvestmentPeriodUnit() {
        return investmentPeriodUnit;
    }

    public void setInvestmentPeriodUnit(String investmentPeriodUnit) {
        this.investmentPeriodUnit = investmentPeriodUnit == null ? null : investmentPeriodUnit.trim();
    }

    public Integer getLowestProfit() {
        return lowestProfit;
    }

    public void setLowestProfit(Integer lowestProfit) {
        this.lowestProfit = lowestProfit;
    }

    public String getRiskControlRequirement() {
        return riskControlRequirement;
    }

    public void setRiskControlRequirement(String riskControlRequirement) {
        this.riskControlRequirement = riskControlRequirement == null ? null : riskControlRequirement.trim();
    }

    public String getCollateralType() {
        return collateralType;
    }

    public void setCollateralType(String collateralType) {
        this.collateralType = collateralType == null ? null : collateralType.trim();
    }

    public Integer getCollateralDiscountStart() {
        return collateralDiscountStart;
    }

    public void setCollateralDiscountStart(Integer collateralDiscountStart) {
        this.collateralDiscountStart = collateralDiscountStart;
    }

    public Integer getCollateralDiscountEnd() {
        return collateralDiscountEnd;
    }

    public void setCollateralDiscountEnd(Integer collateralDiscountEnd) {
        this.collateralDiscountEnd = collateralDiscountEnd;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CapitalInvestmentExtDebt other = (CapitalInvestmentExtDebt) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCapitalInvestmentId() == null ? other.getCapitalInvestmentId() == null : this.getCapitalInvestmentId().equals(other.getCapitalInvestmentId()))
            && (this.getInvestmentPeriodStart() == null ? other.getInvestmentPeriodStart() == null : this.getInvestmentPeriodStart().equals(other.getInvestmentPeriodStart()))
            && (this.getInvestmentPeriodEnd() == null ? other.getInvestmentPeriodEnd() == null : this.getInvestmentPeriodEnd().equals(other.getInvestmentPeriodEnd()))
            && (this.getInvestmentPeriodUnit() == null ? other.getInvestmentPeriodUnit() == null : this.getInvestmentPeriodUnit().equals(other.getInvestmentPeriodUnit()))
            && (this.getLowestProfit() == null ? other.getLowestProfit() == null : this.getLowestProfit().equals(other.getLowestProfit()))
            && (this.getRiskControlRequirement() == null ? other.getRiskControlRequirement() == null : this.getRiskControlRequirement().equals(other.getRiskControlRequirement()))
            && (this.getCollateralType() == null ? other.getCollateralType() == null : this.getCollateralType().equals(other.getCollateralType()))
            && (this.getCollateralDiscountStart() == null ? other.getCollateralDiscountStart() == null : this.getCollateralDiscountStart().equals(other.getCollateralDiscountStart()))
            && (this.getCollateralDiscountEnd() == null ? other.getCollateralDiscountEnd() == null : this.getCollateralDiscountEnd().equals(other.getCollateralDiscountEnd()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCapitalInvestmentId() == null) ? 0 : getCapitalInvestmentId().hashCode());
        result = prime * result + ((getInvestmentPeriodStart() == null) ? 0 : getInvestmentPeriodStart().hashCode());
        result = prime * result + ((getInvestmentPeriodEnd() == null) ? 0 : getInvestmentPeriodEnd().hashCode());
        result = prime * result + ((getInvestmentPeriodUnit() == null) ? 0 : getInvestmentPeriodUnit().hashCode());
        result = prime * result + ((getLowestProfit() == null) ? 0 : getLowestProfit().hashCode());
        result = prime * result + ((getRiskControlRequirement() == null) ? 0 : getRiskControlRequirement().hashCode());
        result = prime * result + ((getCollateralType() == null) ? 0 : getCollateralType().hashCode());
        result = prime * result + ((getCollateralDiscountStart() == null) ? 0 : getCollateralDiscountStart().hashCode());
        result = prime * result + ((getCollateralDiscountEnd() == null) ? 0 : getCollateralDiscountEnd().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", capitalInvestmentId=").append(capitalInvestmentId);
        sb.append(", investmentPeriodStart=").append(investmentPeriodStart);
        sb.append(", investmentPeriodEnd=").append(investmentPeriodEnd);
        sb.append(", investmentPeriodUnit=").append(investmentPeriodUnit);
        sb.append(", lowestProfit=").append(lowestProfit);
        sb.append(", riskControlRequirement=").append(riskControlRequirement);
        sb.append(", collateralType=").append(collateralType);
        sb.append(", collateralDiscountStart=").append(collateralDiscountStart);
        sb.append(", collateralDiscountEnd=").append(collateralDiscountEnd);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}